package org.softmed.rest.editor.comps.full;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JLabel;

import net.miginfocom.swing.MigLayout;

import org.softmed.rest.editor.EditorUtil;
import org.softmed.rest.editor.commons.SwingUtil;
import org.softmed.rest.editor.commons.URIProvider;
import org.softmed.rest.editor.comps.ParameterEditor;
import org.softmed.rest.editor.comps.utils.DeletePanel;

public class ParameterEditorFull extends ParameterEditor implements
		getDeletePanel {

	DeletePanel deletePanel = new DeletePanel(this);

	public ParameterEditorFull(URIProvider uriProvider) {
		super(uriProvider);
		setup();
	}

	public void setFullBackground(Color color) {
		setBackground(color);
		active.setBackground(color);
		deletePanel.setBackground(color);
		maxMinPanel.setBackground(color);
	}

	public void setup() {
		// setFullBackground(Color.GREEN);

		setFullBackground(new Color(197, 226, 223));

//		 setBorder(BorderFactory.createLineBorder(Color.black));
		active.setText("Active");
		SwingUtil.setMinSize(this, 530, 20);
		MigLayout layout = new MigLayout("left, insets "
				+ EditorUtil.smallestInsets + ", gap 0");
		setLayout(layout);

		JLabel title = new JLabel("Parameter");
		// title.setFont(SwingUtil.editorTitleFont);
		add(title, "w 58!");

		add(id, "w 25!");
		add(active, "w 70!");
		add(new JLabel("Name"), "w 33!");
		add(name, "w 120!");
		add(Box.createHorizontalStrut(10));
		add(new JLabel("Value"), "w 32!");
		add(value, "w 120!");
		add(Box.createHorizontalStrut(18));
		add(deletePanel);
		// deletePanel.addToParentEditor(this);

	}

	@Override
	public DeletePanel getDeletePanel() {
		return deletePanel;
	}

	@Override
	public void customMaximize() {
		// TODO Auto-generated method stub

	}

	@Override
	public void customMinimize() {
		// TODO Auto-generated method stub

	}

}
